var express = require('express');
var router = express.Router();
var db=require('../model/mysql');

/* GET home page. */
router.get('/', function(req, res, next) {
  var sql='select id,title,author,post_time from article limit 15;';
  db.query(sql,function(err,data){
      res.render('index', { catData:data,cat_id:0 });
  })
});

module.exports = router;
